package com.wujilin.okra.loader;

import com.wujilin.okra.database.Sql;
import com.wujilin.okra.model.Model;

import android.content.Context;

/**
 * The loader for model.
 * 
 * @author Belin Wu
 *
 */
public class ModelLoader extends DataLoader<Model> {
	private String table;
	private long id;
	
	public ModelLoader(Context context, String table, long id) {
		super(context);
		this.table = table;
		this.id = id;
	}

	@Override
	public Model loadInBackground() {
		return Sql.select(table, id);
	}
}
